package edu.tsp.ga;

import java.util.ArrayList;
import java.util.List;

public class Chromosome {

    private List<Gene> genes;

    public Chromosome(List<Gene> genes) {
        this.genes = genes;
    }

    public List<Gene> getGenes() {
        return genes;
    }

    public Chromosome clone() {
        List<Gene> cloneGenes = new ArrayList<>();
        genes.forEach(g->cloneGenes.add(g.clone()));
        return new Chromosome(cloneGenes);
    }

}
